//
//  YDAccountManager.h
//  IngCard
//
//  Created by kf on 2017/7/10.
//  Copyright © 2017年 IngDan. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "YDAccount.h"
#import "YDLinkedInAccount.h"
#define ACCOUNT [YDAccountManager sharedInstance]

//122694226@qq.com
//123456654321
//http://devsvcard.ingdan.com/account/delete?mobile=18500522131

@interface YDAccountManager : NSObject

@property(nonatomic, strong, readonly) YDAccount *account;
@property(nonatomic, strong, readonly) YDLinkedInAccount *linkedInAccount;

@property(nonatomic, strong) NSString *Notification_userLogin;
@property(nonatomic, strong) NSString *Notification_userLoginOut;

+ (instancetype)sharedInstance;

-(void) getVerifyCode:(NSString *)phoneNumber
             isLogion:(BOOL) isLogin
           onComplete:(void (^)(BOOL success, NSString* msg)) onComplete;


/**
 注册接口
 */
-(void) registerWithPhoneNumber:(NSString *)phoneNumber
                     verifyCode:(NSString *)verifyCode
                     onComplete:(void (^)(BOOL success, NSString* msg)) onComplete;


/**
 快捷登录
 */
-(void) loginWithPhoneNumber:(NSString *)phoneNumber
                 verifyCodeL:(NSString *)verifyCode
                  onComplete:(void (^)(BOOL success, NSString* msg)) onComplete;



/**
 用户登出
 **/
-(void) loginoutOnComplete:(void (^)(BOOL success, NSString* msg)) onComplete;


/**
 获取用户详情，刷新失败则引导用户登录
 1. 登录成功后调用
 2. 注册成功后调用
 3. App启动后自动调用
 */

- (void) getAccountDetail:(void (^)(BOOL success, NSString* msg)) onComplete;


/**
 注册流程第二步：完善个人信息专用接口
 */
-(void) updateBaseInfo:(NSString *) firstName
              lastName:(NSString *) lastName
               company:(NSString *) company
            occupation:(NSString *) occupation
                 email:(NSString *) email
              location:(NSString *) location
            onComplete:(void (^)(BOOL success, NSString* msg)) onComplete;

@end
